package com.cy.pj.sys.dao;

import com.cy.pj.common.vo.SysUserDeptVo;
import com.cy.pj.sys.pojo.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author YuBaoFu
 * @create 2025/06/04
 * @description
 */
@Mapper
public interface SysUserDao {

    int getRowCount(String username);

    List<SysUserDeptVo> findPageObjects(@Param("username") String username,
                                        @Param("startIndex") Integer startIndex,
                                        @Param("pageSize") Integer pageSize);

    int validById(@Param("id")Integer id,
                  @Param("valid")Integer valid,
                  @Param("modifiedUser")String modifiedUser);

    int insertObject(SysUser sysUser);

    SysUserDeptVo findObjectById(Integer id);

    int updateObject(SysUser sysUser);

    SysUser findUserByUsername(@Param("username") String username);

}
